cmake_minimum_required(VERSION 3.0)
project(ffmpegExample)

# 配置编译选项
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -g )

#设置c++11标准
set(CMAKE_CXX_STANDARD 11)

# 配置最终的可执行文件输出的路径
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

# 配置头文件的搜索路径
include_directories(${PROJECT_SOURCE_DIR}/ffmpeg/include)

# 配置库文件的搜索路径
link_directories(${PROJECT_SOURCE_DIR}/ffmpeg/lib)
# 实现库的链接
link_libraries(
      libavcodec
      libavdevice
      libavfilter
      libavformat
      libavutil
      libpostproc
      libswresample
      libswscale
)
#生成时拷贝dll到Bin中(运行时的dll库)
file(GLOB needfiles ${CMAKE_SOURCE_DIR}/ffmpeg/bin/*.dll)
file(COPY ${needfiles} DESTINATION ${EXECUTABLE_OUTPUT_PATH})

# add_executable(muxing muxing.cpp)
# add_executable(demuxing demuxing_decoding.c)
# add_executable(remuxing remuxing.c)
# add_executable(encode_video encode_video.c)
add_executable(remuxing remuxing.c)